package cn.hanna.springcloudalibaba.bean;

import cn.hanna.springcloud.entities.CommonResult;
import cn.hanna.springcloud.entities.Payment;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author smileha
 * @create 2021-10-22 11:52
 * @description
 */
@Component
public class OpenFeginSentinelHandler {

    public CommonResult<Payment> handleFallback(@PathVariable Long id, Throwable e){
        return new CommonResult<>(444,"运行时异常，fallback处理："+e.getMessage()+"id:"+id,null);
    }
}
